package com.neuedu.service.impl;

import com.neuedu.bean.OrderDetailet;
import com.neuedu.mapper.OrderDetailetMapper;
import com.neuedu.service.OrderDetailetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDetailetServiceImpl implements OrderDetailetService {

    @Autowired
    private OrderDetailetMapper orderDetailetMapper;

    @Override
    public int saveOrderDetailetBatch(List<OrderDetailet> list) throws Exception {

        for (OrderDetailet orderDetailet : list) {
            orderDetailetMapper.saveOrderDetailetBatch(orderDetailet);
        }

        return 1;
    }

    @Override
    public List<OrderDetailet> listOrderDetailetByOrderId(Integer orderId) throws Exception {
        return List.of();
    }
}
